unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.OleCtrls, edgeWeb4Delphi_TLB,
  Vcl.StdCtrls, Vcl.Buttons;

type
  TForm1 = class(TForm)
    edgeWeb4DellphiOCX1: TedgeWeb4DellphiOCX;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  //self.edgeWeb4DellphiOCX1.Nav('https://news.163.com');
  self.edgeWeb4DellphiOCX1.Nav('https://www.baidu.com');

end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
  self.edgeWeb4DellphiOCX1.execScript('document.documentElement.innerText');//outerHTML
  //self.edgeWeb4DellphiOCX1.execScript('"{}" ');
end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin
  showmessage(self.edgeWeb4DellphiOCX1.getScriptResult);
end;

end.
